package construction.flyweight;

public class Test {
    public static void main(String[] args) {
        WebsiteFactory websiteFactory = new WebsiteFactory();

        Website website = websiteFactory.getWebsiteCategory("微博");
        website.use(new User("小明"));

        Website website2 = websiteFactory.getWebsiteCategory("微信");
        website2.use(new User("小微"));

        Website website3 = websiteFactory.getWebsiteCategory("微信");
        website3.use(new User("小微2"));

        System.out.println(websiteFactory.size());

    }
}
